package 每日练习;

public class text15 {
    public static void main(String[] args)
    {
        int arr[] = {10,20,30,40,50};
        int i = 0;
        int j = 0;
        for(i=0,j=arr.length - 1;i < j;i++,j--)
        {
            arr[i] = arr[i] ^ arr[j];
            arr[j] = arr[i] ^ arr[j];
            arr[i] = arr[i] ^ arr[j];
        }
        for(i=0;i<arr.length;i++)
        {
            System.out.print(arr[i] + " ");
        }
    }
}
